<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let age=prompt("请输入你的年龄")
      if(age>18){
        alert("你已经成年了")
      }else{
        alert("你还未成年")
      }
    </script>
  </body>
</html>
